import { stringify } from 'qs';
import request from '@/utils/request';

export async function List(params) {
  return request(`/reward/query`, {
    method: 'POST',
    body: {
      ...params,
    },
  });
}

export async function logList(params) {
  return request(`/reward/log/query`, {
    method: 'POST',
    body: {
      ...params,
    },
  });
}

export async function remove(params) {
  return request(`/reward/del/${params.key}`, {
    method: 'POST',
    body: {},
  });
}

export async function add(params) {
  return request('/reward/add', {
    method: 'POST',
    body: {
      ...params,
    },
  });
}

export async function edit(params) {
  return request('/reward/edit', {
    method: 'POST',
    body: {
      ...params,
      method: 'update',
    },
  });
}


export async function Detail(params) {
  console.log('desc', params);
  return request(`/reward/detail/${params.id}`, {
    method: 'POST',
    body: {},
  });
}
